package com.duo.dto;

import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.*;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;

@Data
public class DishDTO implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 菜品名称
     */
    @NotBlank(message = "菜品名称不能为空")
    private String name;

    /**
     * 描述信息
     */
    @Length(max = 100, message = "描述信息不能超过100个字符")
    private String description;

    /**
     * 菜品分类id
     */
    @NotNull(message = "菜品id名称不能为空")
    private Long categoryId;

    /**
     * 菜品价格
     */
    @DecimalMin(value = "0.01", message = "菜品价格不能小于0.01")
    private BigDecimal price;

    /**
     * 图片
     */
    @NotNull(message = "菜品图片不能为空")
    private String image;

    /**
     * 口味
     */
    @NotEmpty(message = "口味不能为空")
    private List<DishFlavorDTO> flavors;

}
